package com.example.iot;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MainActivity extends AppCompatActivity {

    Map<String, List<DataBaseBean>> mapTab1, mapTab2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initData();
    }

    private void initData() {
        mapTab1 = new HashMap<>();
        mapTab2 = new HashMap<>();
        List<DataBaseBean> list1 = new ArrayList<>();
        list1.add(new DataBaseBean("1", "111", "2018-11-26", "哈哈哈"));
        list1.add(new DataBaseBean("2", "222", "2018-11-26", "哈哈哈"));
        list1.add(new DataBaseBean("3", "333", "2018-11-26", "哈哈哈"));
        mapTab1.put("title1", list1);

        List<DataBaseBean> list2 = new ArrayList<>();
        list2.add(new DataBaseBean("1", "111", "2018-11-26", "嘻嘻嘻"));
        list2.add(new DataBaseBean("2", "222", "2018-11-26", "嘻嘻嘻"));
        list2.add(new DataBaseBean("3", "333", "2018-11-26", "嘻嘻嘻"));
        mapTab2.put("title2", list2);
    }

}
